# align
# Builds from https://github.com/puppylinux-woof-CE/petbuilds

. ../func
. ../build.conf

URL=http://www.cs.indiana.edu/~kinzler/align/
PKG=align
VER=1.7.3
COMP=tgz
DESC="align text into columns"
DEPS=+perl_tiny
CAT=BuildingBlock
BUILD=
CWD=$(pwd)
[ -z "$MWD" ] && MWD=$(dirname $CWD)	
[ -z "$BUILD" ] && BUILD=$DEF_BUILD
[ -f "$DESKTOP" ] || DESKTOP=not
[ -z "$DEPS" ] && DEPS=not	

ARCH=$(uname -m)
case $ARCH in
 *64) 	LIBDIR=$LIBCONF64 ;;
 arm*)	LIBDIR=$LIBCONFarm;;
 *) 	LIBDIR=$LIBCONF32 ;;
esac

build() {
	cd ${PKG}-${VER}
	make
	[ 0 -ne $? ] && exit 1
	install -D -m 755 align ../$PKG-install/usr/bin/align
	install -m 755 width ../$PKG-install/usr/bin/width
	install -d -m 0755 ../${PKG}-install/usr/share/doc/align
	install -m 644 README ../${PKG}-install/usr/share/doc/align/README
	install -m 644 COPYING ../${PKG}-install/usr/share/doc/align/COPYING
	cd -
}
	
# main
retrieve ${PKG}-${VER}.${COMP}
extract ${PKG}-${VER}.${COMP}
build
package_std $PKG $VER $ARCH $DESKTOP "$DESC" $DEPS $CAT
